1 package jrre.classloader.classfile.attributes;
2
3 public class Attributes {
4
5 private Attribute [] attributes;
6
7 public Attributes(){}
8
9 public Attributes(Attribute [] attributes){
10 this.attributes = attributes;
11 }
12
13 public void setAttributes(Attribute [] attributes){
14 this.attributes = attributes;
15 }
16
17 public CodeAttribute getCodeAttribute(){
18
19 for(int i=0;i < attributes.length;i++){
20 if(attributes[i] instanceof CodeAttribute)
21 return (CodeAttribute)attributes[i];
22 }
23
24 return null;
25 }
26
27 public String toString(){
28 StringBuffer toReturn = new StringBuffer();
29
30 //toReturn.append("Attributes: ");
31
32 for(int i=0;i< attributes.length;i++)
33 toReturn.append(attributes[i]);
34
35 return toReturn.toString();
36 }
37 }
This page was automatically generated by Maven